﻿<%@ Page Title="Tổng Quan - Sen Quốc Tế" Language="C#" MasterPageFile="~/Admin/AdminMTP.Master" AutoEventWireup="true" CodeBehind="DefaultAdmin.aspx.cs" Inherits="SQT.tracnghiem.Admin.DefaultAdmin" %>

<%@ Import Namespace="DataAccess" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../Content/css/flexslider.css" rel="stylesheet" />
    <link href="../Content/css/bubble.css" rel="stylesheet" />
    <link href="../Content/css/default-admin.css" rel="stylesheet" />
    <script src="../Scripts/Chat.js"></script>
    <script src="../Scripts/calendar.js"></script>
    <script src="../Scripts/javacuatui2.js"></script>
    <script src="../Scripts/notification.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="w3-row">
        <div class="w3-quarter w3-padding-top w3-padding-left w3-padding-right">
            <section class="w3-card-2">
                <div class="flexslider w3-padding-4">
                    <ul class="slides">
                        <li id="total_access">
                            <h4>TỔNG LƯỢT TRUY CẬP</h4>
                            <p><%=DateTime.Now.Day %>/<%=DateTime.Now.Month %>/<%=DateTime.Now.Year %> <%=DateTime.Now.Hour %>:<%=DateTime.Now.Minute %></p>
                            <h3><b><%=Application["Access"].ToString() %></b></h3>
                        </li>
                        <li id="online_access">
                            <p class="w3-large">LƯỢT TRUY CẬP</p>
                            <h3>HIỆN TẠI</h3>
                            <h3><b><%=Application["Online"].ToString() %></b></h3>
                        </li>
                    </ul>
                </div>
            </section>
        </div>
        <div class="w3-quarter w3-padding-top w3-padding-left w3-padding-right">
            <div class="w3-row w3-card-2 w3-white w3-padding-4">
                <div class="w3-quarter w3-padding-16 w3-center w3-xxxlarge w3-border-right w3-hide-small"><i class="fa fa-language"></i></div>
                <div class="w3-twothird w3-center">
                    <h2><b><%=this.count_test %></b></h2>
                    <h6>BÀI TRẮC NGHIỆM</h6>
                    <p>Được làm trong ngày</p>
                </div>
            </div>
        </div>
        <div class="w3-quarter w3-padding-top w3-padding-left w3-padding-right">
            <div class="w3-row w3-card-2 w3-white w3-padding-4">
                <div class="w3-quarter w3-padding-16 w3-center w3-xxxlarge w3-border-right w3-hide-small"><i class="fa fa-user"></i></div>
                <div class="w3-twothird w3-center">
                    <h2><b><%=this.new_user %></b></h2>
                    <h6>THÀNH VIÊN</h6>
                    <p>Đăng ký trong ngày</p>
                </div>
            </div>
        </div>
        <div class="w3-quarter w3-padding-top w3-padding-left w3-padding-right w3-hide-small">
            <div id="thoigianlavang" class="w3-card-2 w3-teal w3-center w3-padding-12">
            </div>
        </div>
    </div>
    <div class="w3-row">
        <div class="w3-col l5 w3-padding">
            <div class="chat-box w3-card-2">
                <header class="w3-padding w3-teal w3-row">
                    <span class="w3-hide-small">SEN Quốc Tế - </span><span>Tin nhắn</span><i title="Bật/Tắt âm thanh" class="mute-btn w3-margin-left fa fa-volume-up"></i>
                    <a class="dropdown w3-right">
                        <i title="Xem thông báo" data-toggle="dropdown" class="notification-btn dropdown-toggle fa fa-bell w3-text-white w3-display-container"><span id="notification_count_view" class="notification-sign w3-deep-orange w3-tiny w3-animate-zoom w3-display-topright" hidden="hidden"></span></i>
                        <div class="notification-box dropdown-menu dropdown-menu-right w3-text-black">
                            <div class="w3-row w3-center w3-border-bottom w3-padding">
                                <span class="noti-header">Thông Báo</span>
                            </div>
                            <div id="notification-ground">
                            </div>
                        </div>
                    </a>
                </header>
                <div class="w3-hide" id="mute_chat">0</div>
                <div class="w3-hide" id="last_chat_id"><%=this.last_id %></div>
                <div class="w3-hide" id="last_chat_id_new"><%=this.last_id %></div>
                <div id="chat" class="chat-container w3-white">
                    <% 
                        if (!String.IsNullOrEmpty(Session["admin_id"].ToString()))
                        {
                            int get_staff = int.Parse(Session["admin_id"].ToString());
                            var check_chat = new TblChatController().FetchAll().ToList();
                            if (check_chat.Count != 0)
                            {
                                var get_messenges = new TblChatController().FetchAll();
                                foreach (TblChat messenges in get_messenges)
                                {
                                    string text = messenges.ChatContent;
                                    string[] temp = new string[text.Split(' ').Count()];
                                    temp = text.Split(' ');
                                    string temp2 = "";
                                    for (int i = 0; i < temp.Length; i++)
                                    {
                                        if (temp[i].Split('_')[0] == "IT'sSQTicons")
                                        {
                                            temp2 += "<img src='../../Content/img/chat-ico/" + temp[i].Split('_')[1] + "' />";
                                        }
                                        else
                                            temp2 += temp[i];
                                        temp2 += " ";
                                    }
                                    if (get_staff == messenges.Chater)
                                    {
                    %>
                    <div class="messenger-chat w3-row">
                        <div class="bubble bubble-alt w3-teal" data-toggle="tooltip" data-placement="left" title="<%=DateTime.Parse(messenges.ChatTime.ToString()).Day+"/"+DateTime.Parse(messenges.ChatTime.ToString()).Month + "/" + DateTime.Parse(messenges.ChatTime.ToString()).Year + " " + DateTime.Parse(messenges.ChatTime.ToString()).Hour +":"+DateTime.Parse(messenges.ChatTime.ToString()).Minute %>">
                            <div class="w3-hide chat_id"><%=messenges.ChatId %></div>
                            <%=temp2 %>
                        </div>
                    </div>
                    <%
                        }
                        else
                        {
                            var get_user = new TblManagerController().FetchAll().Where(x => x.ManagerId == messenges.Chater).Single();
                    %>
                    <div class="messenger-chat w3-row">
                        <a data-toggle="tooltip" data-placement="top" title="<%=get_user.FullName %>" class="us-img">
                            <img src="../../Content/avatar/<%=get_user.Avatar %>" class="w3-circle w3-col" /></a>
                        <div class="bubble bt-simple-grey w3-col" data-toggle="tooltip" data-placement="right" title="<%=DateTime.Parse(messenges.ChatTime.ToString()).Day+"/"+DateTime.Parse(messenges.ChatTime.ToString()).Month + "/" + DateTime.Parse(messenges.ChatTime.ToString()).Year + " " + DateTime.Parse(messenges.ChatTime.ToString()).Hour +":"+DateTime.Parse(messenges.ChatTime.ToString()).Minute %>">
                            <div class="w3-hide chat_id"><%=messenges.ChatId %></div>
                            <%=temp2 %>
                        </div>
                    </div>

                    <%
                                    }
                                }
                            }
                        }
                    %>
                </div>
                <div class="chat-action w3-row w3-border-top w3-white">
                    <input id="enter" class="w3-col w3-white" type="text" placeholder="Nhập tin nhắn..." />
                    <div class="dropup w3-col">
                        <i data-toggle="dropdown" title="Chọn nhãn dán" class="dropdown-toggle chat-icon-btn fa fa-smile-o w3-large w3-text-grey w3-hover-text-teal"></i>
                        <div class="icon-box dropdown-menu dropdown-menu-right">
                            <table>
                                <tr>
                                    <td>
                                        <img class="chat-icon" src="../Content/img/chat-ico/ahihi.png" />
                                    </td>
                                    <td>
                                        <img class="chat-icon" src="../Content/img/chat-ico/call.png" />
                                    </td>
                                    <td>
                                        <img class="chat-icon" src="../Content/img/chat-ico/cool.png" />
                                    </td>
                                    <td>
                                        <img class="chat-icon" src="../Content/img/chat-ico/sick.png" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <img class="chat-icon" src="../Content/img/chat-ico/cry.png" />
                                    </td>
                                    <td>
                                        <img class="chat-icon" src="../Content/img/chat-ico/gruu.png" />
                                    </td>
                                    <td>
                                        <img class="chat-icon" src="../Content/img/chat-ico/hehe.png" />
                                    </td>
                                    <td>
                                        <img class="chat-icon" src="../Content/img/chat-ico/what.png" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <img class="chat-icon" src="../Content/img/chat-ico/itme.png" />
                                    </td>
                                    <td>
                                        <img class="chat-icon" src="../Content/img/chat-ico/laugh.png" />
                                    </td>
                                    <td>
                                        <img class="chat-icon" src="../Content/img/chat-ico/like.png" />
                                    </td>
                                    <td>
                                        <img class="chat-icon" src="../Content/img/chat-ico/wow.png" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <img class="chat-icon" src="../Content/img/chat-ico/love.png" />
                                    </td>
                                    <td>
                                        <img class="chat-icon" src="../Content/img/chat-ico/mad.png" />
                                    </td>
                                    <td>
                                        <img class="chat-icon" src="../Content/img/chat-ico/sayhi.png" />
                                    </td>
                                    <td>
                                        <img class="chat-icon" src="../Content/img/chat-ico/yes.png" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    <a href="javascript:;" class="chat-send-btn hvr-radial-out" id="btn_send">Gửi</a>
                </div>
            </div>
        </div>
        <div class="w3-col l7 w3-padding">
            <div class="checkinout w3-white w3-card-2">
                <%int get_id = int.Parse(Session["admin_id"].ToString());
                    var check_cap = new TblManagerController().FetchAll().Where(x => x.ManagerId == get_id).Single();
                    if (check_cap.Captain == false)
                    {%>
                <header class="w3-padding-8 w3-center">
                    <label class="checkinout-text">ĐIỂM DANH CHẤM CÔNG NGÀY <%=DateTime.Now.Day %>/<%=DateTime.Now.Month %>/<%=DateTime.Now.Year %></label>
                </header>

                <%}
                    else
                    {
                        string date = DateTime.Now.Year + "-";
                        if (DateTime.Now.Month < 10)
                            date = date + "0" + DateTime.Now.Month.ToString() + "-";
                        else
                            date = date + DateTime.Now.Month.ToString() + "-";
                        if (DateTime.Now.Day < 10)
                            date = date + "0" + DateTime.Now.Day.ToString();
                        else
                            date = date + DateTime.Now.Day.ToString();
                %>
                <header class="w3-padding w3-center">
                    <label class="checkinout-text">ĐIỂM DANH CHẤM CÔNG NGÀY</label>
                    <input value="<%=date %>" type="date" id="check_date" class="checkinout-date" /><a title="Xem" class="checkinout-date-btn w3-btn w3-teal" id="btn_change_check"><i class="fa fa-list"></i></a>
                </header>
                <%} %>
                <div class="checkinout-options w3-row">
                    <div class="w3-half w3-center w3-padding-4">
                        <span><b>Nhân viên&nbsp;</b></span>
                        <select class="checkinout-select" id="dsnv">
                            <%
                                if (check_cap.Captain == false)
                                {
                                    var get_admin = new TblManagerController().FetchAll().Where(x => x.ManagerId == int.Parse(Session["admin_id"].ToString())).Single();
                            %>
                            <option value="<%=get_admin.ManagerId%>"><%=get_admin.FullName%></option>
                            <%}
                                else
                                {
                                    var get_admin = new TblManagerController().FetchAll().Where(x => x.Role == int.Parse(Session["admin_level"].ToString()));
                                    foreach (TblManager admin in get_admin)
                                    { %>
                            <%if (admin.ManagerId != int.Parse(Session["admin_id"].ToString()))
                                { %>
                            <option value="<%=admin.ManagerId%>"><%=admin.FullName%></option>
                            <%}
                                else
                                {%>
                            <option selected="selected" value="<%=admin.ManagerId%>"><%=admin.FullName%></option>
                            <%}
                                    }
                                } %>
                        </select>
                    </div>
                    <div class="w3-half w3-center w3-padding-4">
                        <a id="btn_checkin" class="checkinout-options-btn w3-btn w3-teal"><i class="fa fa-pencil"></i>&nbsp;Điểm danh</a>
                        <a id="btn_checkout" class="checkinout-options-btn w3-btn w3-deep-orange"><i class="fa fa-frown-o"></i>&nbsp;Vắng</a>
                    </div>
                </div>
                <div class="checkinout-table">
                    <table class="w3-table">
                        <thead>
                            <tr class="w3-border-bottom">
                                <th class="checkinout-img w3-hide-small w3-center">Ảnh</th>
                                <th><span class="w3-hide-small">Họ</span>&nbsp;<span>Tên</span><span class="w3-hide-small">/Bộ phận</span></th>
                                <th class="time-ship">Giờ làm&nbsp;&nbsp;<i title="Giờ làm" data-toggle="popover" data-trigger="hover" data-content="Sáng: 8:00 - 11:30  Chiều: 13:30 - 17:00  Tối: 17:30 - 21:00" class="fa fa-info-circle w3-hover-text-teal"></i></th>
                                <th>Tùy chọn</th>
                            </tr>
                        </thead>
                        <tbody id="check-in">
                            <%
                                var get_manager_checkin = new TblCheckManagerController().FetchAll().Where(x => DateTime.Parse(x.CheckIn.ToString()).Date == DateTime.Now.Date);
                                var sort_checkin = (from p in get_manager_checkin orderby p.Id descending select p);
                                foreach (TblCheckManager chk in sort_checkin)
                                {
                                    var get_manager = new TblManagerController().FetchAll().Where(x => x.ManagerId == chk.ManagerId).Single();
                                    var get_role = new TblManagerRoleController().FetchAll().Where(x => x.RoleId == get_manager.Role).Single();
                                    string checkout = "";
                                    int check_hour = DateTime.Parse(chk.CheckIn.ToString()).Hour;
                                    string work_time = "";

                                    if (check_hour >= 0 && check_hour <= 12)
                                    {
                                        work_time = "Ca sáng";
                                    }
                                    if (check_hour >= 13 && check_hour <= 16)
                                    {
                                        work_time = "Ca chiều";
                                    }
                                    if (check_hour >= 17 && check_hour <= 24)
                                    {
                                        work_time = "Ca tối";
                                    }
                                    if (chk.CheckOut != null)
                                        checkout = DateTime.Parse(chk.CheckOut.ToString()).Hour + ":" + DateTime.Parse(chk.CheckOut.ToString()).Minute;
                                    if (chk.OverTime == true)
                                    {
                                        work_time += " (Tăng ca)";
                                    }
                                    if (chk.Absent == true)
                                    {
                                        work_time = "Vắng";
                                        if (chk.Accept == true)
                                            work_time += " (Có phép)";
                                    }
                            %>
                            <tr id="<%=chk.Id %>" class="<%=get_manager.ManagerId %>">
                                <td class="checkinout-img w3-hide-small w3-center">
                                    <span class="check_id w3-hide"><%=chk.Id %></span>
                                    <img src="../Content/avatar/<%=get_manager.Avatar %>" class="w3-circle" alt="Avatar" />
                                </td>
                                <td>
                                    <span><%=get_manager.FullName %></span><br />
                                    <span class="w3-text-grey w3-hide-small"><%=get_role.RoleName %></span>
                                </td>
                                <td><%=work_time %></td>
                                <%
                                    if (check_cap.Captain == true && check_cap.Role == get_manager.Role)
                                    { %>
                                <td>
                                    <%if (chk.Accept == false)
                                        {
                                            if (chk.CheckOut != null)
                                            {%>
                                    <i title="Xác nhận" class="btn_confirm_check checkinout-option-btn fa fa-check w3-hover-text-teal"></i>
                                    <%}
                                        else
                                        {%><%}
                                             }
                                             else
                                             { %>
                                    <i title="Đã xác nhận" class="checkinout-option-btn fa fa-check w3-text-teal"></i>
                                    <%} %>
                                    <i title="Chỉnh sửa" class="btn_edit_check checkinout-option-btn fa fa-wrench w3-hover-text-teal"></i>
                                    <i title="Xóa" class="btn_del_check checkinout-option-btn fa fa-trash w3-hover-text-teal"></i>
                                </td>
                                <%}
                                    else
                                    {
                                        if (chk.Accept == true)
                                        {
                                %>

                                <td>
                                    <i title="Đã xác nhận" class="checkinout-option-btn fa fa-check w3-text-teal"></i>
                                </td>
                                <%
                                        }
                                    } %>
                            </tr>
                            <%} %>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="w3-row w3-padding">
        <div class="today-study w3-white w3-card-2">
            <header class="w3-padding-8 w3-center w3-blue">
                <span class="today-study-header-text">CÁC LỚP HỌC NGÀY <%=DateTime.Now.Day %>/<%=DateTime.Now.Month %>/<%=DateTime.Now.Year %></span>
            </header>
            <div class="today-study-table">
                <table class="w3-table w3-white w3-striped">
                    <thead>
                        <tr class="w3-teal">
                            <td>Lớp</td>
                            <td><span class="w3-hide-small">Giáo viên</span><span class="w3-hide-medium w3-hide-large">GV</span></td>
                            <td>Lịch <span class="w3-hide-small">học</span></td>
                            <td>Trình <span class="w3-hide-small">độ</span></td>
                            <td>Bài  <span class="w3-hide-small">đang học</span></td>
                        </tr>
                    </thead>
                    <tbody>
                        <%
                            var get_class = new TblClassController().FetchAll().Where(x => x.Active == true);
                            foreach (TblClass cls in get_class)
                            {
                                string[] split = new string[7];
                                split = cls.Schedule.Split(',');
                                for (int i = 0; i < cls.Schedule.Split(',').Length - 1; i++)
                                {
                                    if (split[i] == "")
                                    {
                                        continue;
                                    }
                                    if (int.Parse(split[i]) == (int)DateTime.Now.DayOfWeek)
                                    {
                                        var get_teacher = new TblManagerController().FetchAll().Where(x => x.ManagerId == cls.Teacher).Single();
                                        string[] study = new string[3];
                                        study = cls.TimeStudy.Split(',');
                        %>
                        <tr>
                            <td><%=cls.ClassName %></td>
                            <td><%=get_teacher.FullName %></td>
                            <td>
                                <%if (study[0] != "")
                                    {%>
                                <span>Sáng <%=study[0].Split('_')[0] %> - <%=study[0].Split('_')[1] %></span><br />
                                <%}
                                    if (study[1] != "")
                                    {%>
                                <span>Chiều <%=study[1].Split('_')[0] %> - <%=study[1].Split('_')[1] %></span><br />
                                <%}
                                    if (study[2] != "")
                                    {%>
                                <span>Tối <%=study[2].Split('_')[0] %> - <%=study[2].Split('_')[1] %></span>
                                <%}
                                    if (study[0] == "" && study[1] == "" && study[2] == "")
                                    {%>
                                <span>&nbsp;</span>
                                <%} %>
                            </td>
                            <td><span><%=cls.ClsLevel %></span></td>
                            <td><%=cls.Lesson %></td>
                        </tr>
                        <%break;
                                    }
                                }
                            }%>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <%
    if (this.check_date == 1)
    {
        DateTime start = DateTime.Parse(this.monday.ToString());
        DateTime End = start.AddDays(6);
        DateTime temp = start;
    %>
    <div class="w3-row w3-padding">
        <div id="this_week" class="weekly-work w3-white w3-card-2">
            <header class="w3-row w3-padding-4 w3-center w3-deep-orange">
                <%if (get_last_week(week_id) != 0)
    { %>
                <a onclick="load_week(<%=get_last_week(week_id) %>)" href="javascript:;" title="Tuần trước" class="weekly-work-slide-btn w3-text-white w3-left"><i class="fa fa-chevron-left"></i></a>
                <%} %>
                <%if (get_next_week(week_id) != 0)
    { %>
                <a onclick="load_week(<%=get_next_week(week_id) %>)" href="javascript:;" title="Tuần sau" class="weekly-work-slide-btn w3-text-white w3-right"><i class="fa fa-chevron-right"></i></a>
                <%} %>
                <span class="weekly-work-header-text">LỊCH LÀM VIỆC <%=this.week_year%> Tuần <%=week_name%> (<%=start.Day%>/<%=start.Month%>/<%=start.Year%> - <%=End.Day%>/<%=End.Month%>/<%=End.Year%>)</span><br />
                <span class="weekly-work-update-text">(Cập nhật ngày <%=this.update.Day%>/<%=this.update.Month%>/<%=this.update.Year%>)</span>
            </header>
            <div class="weekly-work-table w3-responsive">
                <table class="w3-table w3-white w3-bordered w3-centered w3-striped">
                    <thead>
                        <tr class="w3-teal">
                            <td class="w3-hide-small w3-hide-medium">Giáo viên</td>
                            <td>Giờ làm</td>
                            <td>Thứ 2 (<%=temp.Day%>/<%=temp.Month%>)</td>
                            <%for (int i = 1; i < 7; i++)
    {%>

                            <%
    if (temp.AddDays(i).DayOfWeek == DayOfWeek.Sunday)
    {%>
                            <td>Chủ Nhật (<%=temp.AddDays(i).Day%>/<%=temp.AddDays(i).Month%>)</td>
                            <%}
    else
    {
        int day = (int)temp.AddDays(i).DayOfWeek;%>
                            <td>Thứ <%=day += 1%> (<%=temp.AddDays(i).Day%>/<%=temp.AddDays(i).Month%>)</td>
                            <%}
    }%>
                        </tr>
                    </thead>
                    <tbody>
                        <%
    var get_staff = new TblManagerController().FetchAll().Where(x => x.Role == 2 && x.Active == true);
    foreach (TblManager staff in get_staff)
    {
        var get_work = new TblWorkingController().FetchAll().Where(x => x.Manager == staff.ManagerId && x.Week == week_id).ToList();
        string time = "&nbsp;", mon = "&nbsp;", tue = "&nbsp;", thu = "&nbsp;", wed = "&nbsp;", fri = "&nbsp;", sat = "&nbsp;", sun = "&nbsp;";
        int row_id = 0;
        if (get_work.Count > 0)
        {
            if (!string.IsNullOrEmpty(get_work[0].Time))
                time = get_work[0].Time;
            if (!string.IsNullOrEmpty(get_work[0].Monday))
                mon = get_work[0].Monday;
            if (!string.IsNullOrEmpty(get_work[0].Tuesday))
                tue = get_work[0].Tuesday;
            if (!string.IsNullOrEmpty(get_work[0].Wednesday))
                wed = get_work[0].Wednesday;
            if (!string.IsNullOrEmpty(get_work[0].Friday))
                fri = get_work[0].Friday;
            if (!string.IsNullOrEmpty(get_work[0].Thursday))
                thu = get_work[0].Thursday;
            if (!string.IsNullOrEmpty(get_work[0].Saturday))
                sat = get_work[0].Saturday;
            if (!string.IsNullOrEmpty(get_work[0].Sunday))
                sun = get_work[0].Sunday;
            if (!string.IsNullOrEmpty(get_work[0].Id.ToString()))
                row_id = get_work[0].Id;
        }
                        %>
                        <tr class="w3-hide-large w3-border-bottom w3-border-top w3-border-teal">
                            <td colspan="8"><%=staff.FullName%></td>
                        </tr>
                        <tr class="row_work">
                            <td rowspan="6" class="w3-white w3-border-right w3-hide-small w3-hide-medium">
                                <span class="w3-hide row_id"><%=row_id%></span>
                                <span class="w3-hide manager_id"><%=staff.ManagerId%></span>
                                <img src="../Content/avatar/<%=staff.Avatar%>" class="weekly-work-img" /><br />
                                <div class="w3-padding-8"><%=staff.FullName%></div>
                            </td>
                            <td class="work_time work"><%=time%></td>
                            <td class="work_mon work"><%=mon%></td>
                            <td class="work_tue work"><%=tue%></td>
                            <td class="work_wed work"><%=wed%></td>
                            <td class="work_thu work"><%=thu%></td>
                            <td class="work_fri work"><%=fri%></td>
                            <td class="work_sat work"><%=sat%></td>
                            <td class="work_sun work"><%=sun%></td>
                        </tr>

                        <%
                            for (int i = 1; i < 6; i++)
                            {
                                string time1 = "&nbsp;", mon1 = "&nbsp;", tue1 = "&nbsp;", thu1 = "&nbsp;", wed1 = "&nbsp;", fri1 = "&nbsp;", sat1 = "&nbsp;", sun1 = "&nbsp;";
                                int row_id1 = 0;
                                if (get_work.Count > i)
                                {
                                    if (!string.IsNullOrEmpty(get_work[i].Time))
                                        time1 = get_work[i].Time;
                                    if (!string.IsNullOrEmpty(get_work[i].Monday))
                                        mon1 = get_work[i].Monday;
                                    if (!string.IsNullOrEmpty(get_work[i].Tuesday))
                                        tue1 = get_work[i].Tuesday;
                                    if (!string.IsNullOrEmpty(get_work[i].Wednesday))
                                        wed1 = get_work[i].Wednesday;
                                    if (!string.IsNullOrEmpty(get_work[i].Friday))
                                        fri1 = get_work[i].Friday;
                                    if (!string.IsNullOrEmpty(get_work[i].Thursday))
                                        thu1 = get_work[i].Thursday;
                                    if (!string.IsNullOrEmpty(get_work[i].Saturday))
                                        sat1 = get_work[i].Saturday;
                                    if (!string.IsNullOrEmpty(get_work[i].Sunday))
                                        sun1 = get_work[i].Sunday;
                                    if (!string.IsNullOrEmpty(get_work[i].Id.ToString()))
                                        row_id1 = get_work[i].Id;
                                }
                        %>
                        <tr class="row_work">
                            <td class="w3-hide manager_id"><%=staff.ManagerId%></td>
                            <td class="w3-hide row_id"><%=row_id1%></td>
                            <td class="work_time work"><%=time1%></td>
                            <td class="work_mon work"><%=mon1%></td>
                            <td class="work_tue work"><%=tue1%></td>
                            <td class="work_wed work"><%=wed1%></td>
                            <td class="work_thu work"><%=thu1%></td>
                            <td class="work_fri work"><%=fri1%></td>
                            <td class="work_sat work"><%=sat1%></td>
                            <td class="work_sun work"><%=sun1%></td>
                        </tr>
                        <%}%>

                        <%} %>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <%}%>
    <div id="suadiemdanh" class="w3-modal">
    </div>
    <div id="del_check" class="w3-modal">
        <div class="checkinout-delete-modal w3-modal-content w3-animate-top w3-card-8 w3-deep-orange">
            <header class="w3-padding-4 w3-center">
                <span id="del_check_id" class="w3-hide"></span>
                <p class="w3-large">Bạn có chắc chắn muốn xóa điểm danh này ?</p>
            </header>
            <div class="w3-row w3-padding w3-center">
                <a id="btn_deleted_check" class="w3-btn w3-deep-orange w3-border w3-border-white w3-hover-white w3-hover-text-deep-orange"><i class="fa fa-trash"></i>&nbsp;Xóa</a>
                <a onclick="$('#del_check').fadeOut()" class="w3-btn w3-deep-orange w3-border w3-border-white w3-hover-white w3-hover-text-deep-orange"><i class="fa fa-times"></i>&nbsp;Hủy</a>
            </div>
        </div>
    </div>
    <div id="notification_modal" class="w3-modal">
        <div class="notification_modal w3-modal-content">
            <i class="fa fa-times w3-closebtn w3-hover-text-white w3-red w3-padding" onclick="notification_modal_exit()"></i>
            <div id="notification_content">
            </div>
        </div>
    </div>
    <!-- FlexSlider -->
    <script src="../Scripts/jquery.flexslider.js"></script>

    <script type="text/javascript">
        window.onload = time();
        $(window).load(function () {
            $('.flexslider').flexslider({
                animation: "slide",
                start: function (slider) {
                    $('body').removeClass('loading');
                }
            });
        });
        $(document).ready(function () {
            $('[data-toggle="popover"]').popover();
        });
    </script>
</asp:Content>
